/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.RealEstate;
import com.aptech.session.RealEstateFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Administrator
 */
@ManagedBean
@RequestScoped
public class SearchRealEstateBean {
    @EJB
    private RealEstateFacadeLocal realEstateFacade;
    private String field;

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public List<RealEstate> getListrealestate() {
        return listrealestate;
    }

    public void setListrealestate(List<RealEstate> listrealestate) {
        this.listrealestate = listrealestate;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    private Object value;
    private List<RealEstate> listrealestate;
    /** Creates a new instance of SearchRealEstateBean */
    public SearchRealEstateBean() {
    }
    
    public String searchrealestate()
    {
        listrealestate=realEstateFacade.SearchRealEstate(field, value);
        return "ResultRealEstate";
    }
}
